package com.first.hms.service;

import com.first.hms.entity.Staff;
import com.first.hms.mapper.RoomMapper;
import com.first.hms.mapper.StaffMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * 员工服务 (Staff)
 * 方法：
 *
 * addStaff (Staff staff)：添加员工
 * updateStaff (Staff staff)：更新员工身份
 * selectStaff (Staff staff)：查询所有员工、员工登录、核验身份
 * deleteStaff ()：删除员工*/
@Service
public class StaffService {
    @Autowired
    private StaffMapper staffMapper;

    public int addStaff(Staff staff){
        return staffMapper.addStaff(staff);
    }

    public int updateStaff(Staff staff) {
        return staffMapper.updateStaff(staff);
    }

    public Staff selectStaff(Staff staff) {
        return staffMapper.selectStaff(staff);
    }

    public ArrayList<Staff> selectStaffs() {
        return staffMapper.selectStaffs();
    }

    public int deleteStaff(Staff staff) {
        return staffMapper.deleteStaff(staff);
    }

}
